home *** CD-ROM | disk | FTP | other *** search
/ Aminet 45 / Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso / Aminet / game / role / ldmud-3.2-bin.lha / mud / doc / efun / query_command < prev    next >
Text File  |  2001-04-06  |  820b  |  30 lines

  1. SYNOPSIS
  2.         string query_command(void)
  3.  
  4. DESCRIPTION
  5.         Give the text of the current command, or 0 if not executing
  6.         from a command.
  7.  
  8.         The text is the command as seen by the parser, ie. after
  9.         modify_command and after stripping trailing spaces.
  10.  
  11.         query_command() returns 0 when invoked by a function which was started
  12.         by a call_out or the heart beat.  Also when a user logs in
  13.         query_command() returns 0.
  14.  
  15. EXAMPLE
  16.         void init() {
  17.            ...
  18.            add_action("sing","sing");
  19.            ...
  20.         }
  21.         int sing(string str) {
  22.            write("Your command was:"+query_command()+"\n");
  23.            return 1;
  24.         }
  25.         
  26.         When ever you type "sing ..." you get "Your command was: sing ...".
  27.  
  28. SEE ALSO
  29.         add_action(E), query_verb(E)
  30.